@echo off
del *.hex /Q >nul 2>nul

set sd_findReult=0
for %%i in (../../../../../components/softdevice/s132/hex/*.hex) do (
set /a sd_findReult+=1
echo %%i
)
echo.
if %sd_findReult% neq 1 goto Copy_Condition_Error

copy ..\..\..\..\..\components\softdevice\s132\hex\*.hex .\*.hex /Y
if %errorlevel% equ 0 goto Copy_Okay
echo.
goto Copy_Okay
:Copy_Condition_Error
echo The source softdevice HEX files (%sd_findReult%)!=1 
echo Please check it first.
echo.
pause

:Copy_Okay
